import { request} from "./request";
// 登录接口
// interface login{
//     password: string,
//     mobile: string
// }
type User = {
    id: string
    account: string
    avatar: string
    mobile: string
    token: string
  }
//   登录
  export const getLogin = (mobile: string, password: string) =>
  request<User>('login/password', 'POST', { mobile, password })
  type OmitUser = Omit<User, 'token'>
type UserInfo = OmitUser & {
  likeNumber: number
  collectionNumber: number
  score: number
  couponNumber: number
  orderInfo: {
    paidNumber: number
    receivedNumber: number
    shippedNumber: number
    finishedNumber: number
  }
}


//   用户
export const getUserInfo = () => request<UserInfo>('patient/myUser')


